package it.etoken.component.news.dao.mapper;

import it.etoken.base.model.news.entity.HtmlTemplate;
import it.etoken.base.model.news.entity.HtmlTemplateExample;
import it.etoken.component.news.dao.provider.HtmlTemplateSqlProvider;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
@Mapper
public interface HtmlTemplateMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @SelectProvider(type=HtmlTemplateSqlProvider.class, method="countByExample")
    long countByExample(HtmlTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @DeleteProvider(type=HtmlTemplateSqlProvider.class, method="deleteByExample")
    int deleteByExample(HtmlTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @Delete({
        "delete from html_template",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @Insert({
        "insert into html_template (id, template)",
        "values (#{id,jdbcType=BIGINT}, #{template,jdbcType=VARCHAR})"
    })
    int insert(HtmlTemplate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @InsertProvider(type=HtmlTemplateSqlProvider.class, method="insertSelective")
    int insertSelective(HtmlTemplate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @SelectProvider(type=HtmlTemplateSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="template", property="template", jdbcType=JdbcType.VARCHAR)
    })
    List<HtmlTemplate> selectByExample(HtmlTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @Select({
        "select",
        "id, template",
        "from html_template",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="template", property="template", jdbcType=JdbcType.VARCHAR)
    })
    HtmlTemplate selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @UpdateProvider(type=HtmlTemplateSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") HtmlTemplate record, @Param("example") HtmlTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @UpdateProvider(type=HtmlTemplateSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") HtmlTemplate record, @Param("example") HtmlTemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @UpdateProvider(type=HtmlTemplateSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(HtmlTemplate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table html_template
     *
     * @mbg.generated Mon Jul 02 18:12:15 CST 2018
     */
    @Update({
        "update html_template",
        "set template = #{template,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(HtmlTemplate record);
}